This is a program which computes the Riemann sums and trapezoid rule sums of an expression over a given interval with a given number of steps. It is used for the estimation of the area under a curve, i.e. an integral. For information on Riemann sums, see \href{http://en.wikipedia.org/wiki/Riemann_sum}{\tt http://en.wikipedia.org/wiki/Riemann\_\-sum} . The entry point is \hyperlink{ram_8c_aa212f497d0e60a46a30582320c2fefef}{\_\-main()} in \hyperlink{ram_8c}{ram.c} when run on a graphing calculator. From the user's point of view, the program is a function, taking arguments and returning a result. From the code's point of view, it must pop off the arguments from an \char`\"{}expression stack\char`\"{}, in order to access the algebraic expressions it is passed. It then pushes the result back onto the stack. This is useful as an executable on the calculator, but not as useful when called from other C or assembly language programs.

For reentrant library functions which do Riemann sums and trapeziod rule calculations, see \hyperlink{ram_8c_a549bc93c3536bde8ffbcca9bb5035fda}{riemann\_\-sum()} or \hyperlink{ram_8c_a0415ba140e87ce3dca1acc1017f36fc7}{trap\_\-rule()} in \hyperlink{ram_8c}{ram.c}.

Various functions dealing with popping or examining elements on the expression stack are located in \hyperlink{jstack_8c}{jstack.c}.\hypertarget{index_Arguments}{}\section{Arguments}\label{index_Arguments}
The function call on the graphing calculator is of the form {\bfseries  ramlib(expression, var, lower\_\-bounds, upper\_\-bounds, number\_\-of\_\-steps, function\_\-index) }

Note: The arguments are taken from the expression stack on the calculator. For the user, this simply means that they can be passed in the usual manner i.e. \char`\"{}ramlib(a,b,c..)\char`\"{}. However, in order to use the results as part of a further expression (i.e. \char`\"{}2$\ast$ramlib(a,b,c...)\char`\"{}), it might require the HW3 Patch, available from Kevin Kofler at \href{http://www.tigen.org/kevin.kofler/ti89prog.htm}{\tt http://www.tigen.org/kevin.kofler/ti89prog.htm} \hypertarget{index_expression}{}\subsection{expression}\label{index_expression}
The function to be integrated \hypertarget{index_var}{}\subsection{var}\label{index_var}
The variable of integration. \hypertarget{index_lower_bounds}{}\subsection{lower bounds}\label{index_lower_bounds}
The lower boundary of the interval. \hypertarget{index_upper_bounds}{}\subsection{upper bounds}\label{index_upper_bounds}
The upper boundary of the interval. \hypertarget{index_number_of_steps}{}\subsection{number of steps}\label{index_number_of_steps}
The number of sections to divide the region into; the number of sampling points. Increasing this will increase the accuracy, but will make the program take longer to execute. \hypertarget{index_function_index}{}\subsection{function index}\label{index_function_index}
This determines which computation will be performed according to the following table: \par
 0 = left riemann sum \par
 1 = middle riemann sum \par
 2 = right riemann sum \par
 3 = trapezoid rule 